package com.ant.storage.service;

import com.ant.storage.common.ResultVo;
import com.ant.storage.dto.*;
import com.ant.storage.pojo.AuditList;
import com.ant.storage.pojo.PurchaserRecord;
import com.ant.storage.pojo.Subscribe;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.github.pagehelper.PageInfo;
import org.apache.tomcat.jni.Mmap;
import org.springframework.validation.BindingResult;

import java.util.List;
import java.util.Map;


/**
 * <p>
 *  服务类
 * </p>
 *
 * @author melon
 * @since 2022-03-16
 */
public interface ISubscribeService extends IService<Subscribe> {

    ResultVo addPlanPurchase(SubscribeDto subscribeDto, BindingResult bindingResult);

    ResultVo generatePurchaseOrder(Integer id, Integer status);


    List<Subscribe> getList(Wrapper<Subscribe> queryWrapper);
    /**
     * 通过id获取采购单详情
     * @param id
     * @return
     */
    Subscribe getPurchaseOrderById(Integer id);

    /**
     * 通过id获取小程序采购单详情
     * @param id
     * @return
     */
    Subscribe getAppletPurchaseOrderById(Integer id);

    List<Subscribe> getAppletPurchaseOrderByIds(String ids,Integer pid);
    /**
     *
     * @param purchaseDto
     * @return
     */
    ResultVo goodSingleCompletion(PurchaserDto purchaseDto);

    /**
     * 采购单完成
     * @param id
     * @return
     */
    ResultVo goodAllCompleted(Integer id,Integer uid);

    ResultVo PurchaseWarehousing(Integer id);

    PageInfo<Subscribe> queryAllPage(SubscribeDto subscribeDto);

    ResultVo price();

    ResultVo updateImgUrl(ImgUrlDto dto);


    /**
     * 小程序采购单完成采购
     * @param dto
     * @return
     */
    ResultVo subscribeAllCompleted(List<SubDto> dto);

    ResultVo subscribeReimbursement(Integer[] ids,Integer purchaserId);

    /**
     * 小程序获取采购单
     * @param subscribeDto
     * @return
     */
    PageInfo<Subscribe> appletQueryAllPage(SubscribeDto subscribeDto);


    /**
     * 小程序采购单请款处理
     * @param dto
     * @return
     */
    ResultVo getMergeApply(MergeDto dto);

    /**
     *
     * @param id
     * @return
     */
    List<PurchaserRecord> findSubscribeIdPurchaserRecord(Integer id);

    AuditList selectIsAudit(String processInstanceId, String user_id);

    void getprocessInstanceIdById(String processInstanceId,String opinion);

    Map<String,Object> queryWarehousingAllPage(SubscribeDto subscribeDto);

    Map<String,Object> queryCarAllPage(SubscribeDto dto);

    void getCarAdoptApply(Integer id);
}
